<%@include file="/_checkSession.jsp"%>
<%@ page language="java" import="java.util.*, Container.*, java.text.SimpleDateFormat" pageEncoding="ISO-8859-1"%>

<%
	ArrayList<Item> itemList = (ArrayList<Item>)request.getAttribute("items");
	Iterator<Item> it = itemList.iterator();
	int numPage = (Integer)(request.getAttribute("numPage"));
%>


<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>CS646 Auction System</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width">

        <link rel="stylesheet" href="css/bootstrap.min.css">
        <style>
            body {
                padding-top: 60px;
                padding-bottom: 40px;
            }
        </style>
        <link rel="stylesheet" href="css/bootstrap-responsive.min.css">
        <link rel="stylesheet" href="css/main.css">
		<link href="http://ir.ebaystatic.com/z/mf/epubopzczm55fn4cqrgb14a1c.css?dataUri=true" type="text/css" rel="stylesheet">
		<link href="http://ir.ebaystatic.com/z/q0/cqjtvthoh24nrgx54w13elnqm.css?dataUri=true" type="text/css" rel="stylesheet">

        <script src="js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
    </head>
    <body>

        <div class="container">
 			<div class="hero-unit">




				<div class="clt">
					<span class="rcnt"><%=request.getAttribute("numResult") %></span>
					<span class="kwcat">results</span><br>
				</div>

 			
 			
 			
 			
<% 
	while(it.hasNext())
	{ Item item = it.next();
%>		
 			
 				<div id="e1-52" class="rs rsw t225"  _sp="p2045573.m1686">				
					<div id="ResultSetItems"  class="lnkClr" ><br><br>
						<table listingId="130927082370" class="li rsittlref shic" r="23" itemprop="offers" itemscope itemtype="http://schema.org/Offer">				
							<tbody class="lyr" itemprop="itemOffered" itemscope itemtype="http://schema.org/Product">
								<tr itemprop="offers" itemscope itemtype="http://schema.org/Offer">
									<td class="pic p225 lt img" iid="130927082370"  rowspan=2>
										<div class="l-shad lftd pshad">
											<div class="picW">
												<div class="s225">								
													<b class="dum"></b>
													<a href="RequestProcess?uid=<%= session.getAttribute("uid") %>&sid=<%= session.getAttribute("sid") %>&type=itemDetail&iid=<%=item.getIid() %>" class="img" itemprop="url">
														<img itemprop="image" src=<%=item.getImg() %> class="img" />
													</a>
												</div>
											</div>
										</div>
									</td>
									<td class="dtl dtlsp" >
										<div class="ittl">
														<h4><a href="http://www.ebay.ca/itm/Super-Mint-Sprint-Samsung-Galaxy-S-3-III-L710-Marble-White-16GB-/130927082370?pt=Cell_Phones&hash=item1e7bdcbb82"  class="vip " title='Super Mint Sprint Samsung Galaxy S 3 III L710 Marble White 16GB' itemprop="name"><%=item.getName() %></a>
											</h4>
										</div> 								
										<div class="dyn dynS">					
											<div class="s1">Item id:&nbsp;<span class="v"><%=item.getIid() %>></span></div>
											<div class="s1">Seller User Id:&nbsp;<span class="v"><%=item.getSeller() %></span></div>
											<%
												SimpleDateFormat format = new SimpleDateFormat("MM dd yyyy, HH:mm:ss");
											 %>
											<div class="s1">End Time:&nbsp;<span class="v"><%=format.format(item.getEnd()) %></span></div>
											<div class="s1">Item Description:&nbsp;<span class="v"><%=item.getDescription() %></span></div>				    
										</div>
											<div class="logos">
												<img  class="iconTrsMini" src="http://pics.ebaystatic.com/aw/pics/s.gif" alt="Get fast shipping and excellent service when you buy from eBay PowerSellers" />
												<img  src="http://pics.ebaystatic.com/aw/pics/s.gif" height="16" width="16" alt="This seller accepts PayPal" class="sprIcons1 iippl" />
											</div>
									</td>							
									<td class="prc conprices">
										<div  class="g-b bpo">				
											<div  class="g-b" itemprop="price"><b>C $</b><%=item.getCo() %></div>
											<div class="bin">
												<span>
													<div>Current Offer</div>
												</span>
											</div>
										</div>
									</td>
									<td class='prc conprices'>
										<div  class="g-b bpo">				
											<div  class="g-b" itemprop="price"><b>C $</b><%=item.getBo() %></div>
											<div class="bin">
												<span>
													<div>Buy It Now</div>
												</span>
											</div>
										</div>
									</td>
								</tr>
							</tbody>
						</table>			
					</div>
				</div>
<%} %>				
				
				
				
				
				
				
				
				
				
				
				<!-- <div id="ResultSetItems"></div>	 -->
				<div id="PaginationAndExpansionsContainer">
					<hr/>

					<table class="pagn pagn-m">
						<tr>
							<td class="pagn-prev" _sp="p2045573.m1686.l1581"><a  title="Previous page of results" aria-disabled="true" class="gspr prev-d" href="javascript:;" ></a></td>
<%for(int i = 1; i <= numPage; i++) {%>
								<td class="pages" _sp="p2045573.m1686.l1513">
									<!-- <a  class="pg  curr" href="http://www.ebay.ca/sch/i.html?_sacat=0&_from=R40&_nkw=samsung+galaxy+s3&rt=nc" onClick="return false;" >1</a><span></span> -->
									<a  class="pg " href="RequestProcess?uid=<%= session.getAttribute("uid") %>&sid=<%= session.getAttribute("sid") %>&type=searchPage&page=<%=i %>"  ><%=i %></a><span></span>
								</td>
<%} %>
							<td class="pagn-next" _sp="p2045573.m1686.l1581"><a  title="Next page of results"  class="gspr next" href="http://www.ebay.ca/sch/i.html?_sacat=0&_from=R40&_nkw=samsung+galaxy+s3&_pgn=2&_skc=25&rt=nc"></a></td>
						</tr>
					</table>					
				</div>
			</div>


















            <!-- Main hero unit for a primary marketing message or call to action -->
<%--             
            <div class="hero-unit">
                <h1>Search Result</h1>
                  <table border="0" cellpadding="3" cellspacing="0" width="100%">
				    <tbody>
				      <tr valign="top">
				        <td><span class="nobreak"> 页:
				          1,316 - <span class="jive-paginator"> [ <a href="http://bbs.chinajavaworld.com/forum.jspa?forumID=20&amp;start=0&amp;isBest=0">上一页</a> | <a href="http://bbs.chinajavaworld.com/forum.jspa?forumID=20&amp;start=0&amp;isBest=0" class="">1</a> <a href="http://bbs.chinajavaworld.com/forum.jspa?forumID=20&amp;start=25&amp;isBest=0" class="jive-current">2</a> <a href="http://bbs.chinajavaworld.com/forum.jspa?forumID=20&amp;start=50&amp;isBest=0" class="">3</a> <a href="http://bbs.chinajavaworld.com/forum.jspa?forumID=20&amp;start=75&amp;isBest=0" class="">4</a> <a href="http://bbs.chinajavaworld.com/forum.jspa?forumID=20&amp;start=100&amp;isBest=0" class="">5</a> <a href="http://bbs.chinajavaworld.com/forum.jspa?forumID=20&amp;start=125&amp;isBest=0" class="">6</a> | <a href="http://bbs.chinajavaworld.com/forum.jspa?forumID=20&amp;start=50&amp;isBest=0">下一页</a> ] </span> </span> </td>
				      </tr>
				    </tbody>
				  </table>
                <% while(it.hasNext()){ 
                	Item i = it.next();%>
	                <form class="navbar-form" action="RequestProcess" method="post">
	                	<%=i.getName() %>	                	
	                	<img  src=<%=i.getImg() %>>
	                	seller:<%=i.getSeller() %>
	                	buyout price:<%=i.getBuyoutPrice() %>
						<input type="hidden" name="iid" value=<%=i.getIid() %>>
	                    <input type="hidden" name="type" value="itemDetail">
	                    <button type="submit" class="btn btn-primary">Detail</button>
	                </form>                
                <%} %>
            </div>
 --%>
            <!-- Example row of columns -->



        </div> <!-- /container -->

        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
        <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.9.1.min.js"><\/script>')</script>

        <script src="js/vendor/bootstrap.min.js"></script>

        <script src="js/main.js"></script>

        <script>
            var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
            (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
            g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
            s.parentNode.insertBefore(g,s)}(document,'script'));
        </script>
    </body>
</html>
